import {HttpService} from "./HttpService";
import {Http} from "@angular/http";
import {Injectable} from "@angular/core";

import 'rxjs/add/operator/map';
import 'rxjs/add/operator/toPromise';


@Injectable()
export class LogOutService extends HttpService{

    protected url="Logout";


    constructor(private http:Http){super()}

    public logout():Promise<boolean>{

        return this.http.get(this.prefix+this.url)
            .map(response=>response.json().result as boolean)
            .toPromise();

    }





}